package com.hyt.it.ogt.kq.common.bm.enums;

import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * 证件类型枚举
 * @Description
 */
@Getter
public enum CertificateTypeEnum {
	IDCARD("0", "大陆居民身份证"),
	HONGKONGMACAOANDTAIWANIDCARD("1", "港澳台身份证"),
	PASSPORT("2", "护照");

    private String type;
    private String desc;


    CertificateTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }
    
    public static String getDescByType(String type) {
    	if(StringUtils.isEmpty(type)) {
    		return null;
    	}
    	for (CertificateTypeEnum certificateTypeEnum : CertificateTypeEnum.values()) {
    		if(certificateTypeEnum.getType().equals(type)){
    			return certificateTypeEnum.getDesc();
    		}
		}
		return type;
    	
    }
}
